﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace XMM.Dialoges.Library
{
    /// <summary>
    /// Interaktionslogik für ChangeDriveLetter.xaml
    /// </summary>
    public partial class ChangeDriveLetter : Window
    {
        public string NewDriveLetter { get; set; }

        public ChangeDriveLetter(string sCurrentDriveLetter)
        {
            InitializeComponent();

            lblCurrentDriveLetter.Content = sCurrentDriveLetter + ":";
        }

        private void btnApply_Click(object sender, RoutedEventArgs e)
        {
            if (txtNewDriveLetter.Text != String.Empty)
            {
                NewDriveLetter = txtNewDriveLetter.Text;
                this.DialogResult = true;
                this.Close();
            }
        }

        private void btnAbort_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
            this.Close();
        }
    }
}
